Repository navigation
Fix packaged desktop stuck waiting for API - #24
Merged
Merged
Conversation
Point the webview at an absolute API base URL, store vault data in the OS app-data dir, wait for /api/health before load, and stop the bundled sidecar from auto-seeding on every launch. Co-authored-by: Damon <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Packaged desktop builds (including Windows) could hang forever on “Loading…” / never reach the API. Three root causes:
/api, which only works behind the Vite proxy. Packaged Tauri has no proxy.PRM_DATA_DIRdefaulted toCARGO_MANIFEST_DIR/.../data(a CI/build-machine path), so the sidecar could fail to start on a user PC.seed.tsintoprm-api.mjsmadeimport.meta.url === argv[1]true, so every sidecar launch tried to seed.Fixes
window.__PRM_API_BASE_URL__and route all UI fetches throughapiUrl()%APPDATA%\com.prm.workbenchon Windows)/api/health(and log sidecar stdout/stderr todesktop-api.log)waitForApi()retries on desktopseed.ts/seed.jsVerified locally (Linux AppImage)
Built
pnpm desktop:build, ran the AppImage under Xvfb:Packaged desktop Create workbench
After merge, re-download the Windows artifact from the next green
maindesktop CI run.To show artifacts inline, enable in settings.